package com.baoteng.rbspy.vo.response;

import java.util.Date;

import com.baoteng.rbspy.vo.JsonDateDeserializer;
import com.baoteng.rbspy.vo.JsonDateSerializer;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

@JsonInclude(Include.NON_EMPTY)
public class CommonResponse {

	/**
	 * 核保状态 1--成功，3--材料上传 2 验车照
	 * 0业务异常
	 * -1系统异常
	 */
	private Integer businessStatus;
	private String statusMessage;

	String userId;
	String wsId;
	String bizId;
	@JsonSerialize(using = JsonDateSerializer.class)
	@JsonDeserialize(using = JsonDateDeserializer.class)
	private Date time = new Date();

	private String otherMessage;

	private String echo;
	
	private String cityId;
	
	private String cityName;
	
	public CommonResponse() {

	}

	public CommonResponse(Integer businessStatus, String statusMessage, Date time) {
		this.businessStatus = businessStatus;
		this.statusMessage = statusMessage;
		this.time = time;
	}

	public String getBizId() {
		return bizId;
	}

	public void setBizId(String bizId) {
		this.bizId = bizId;
	}

	public Integer getBusinessStatus() {
		return businessStatus;
	}

	public void setBusinessStatus(Integer businessStatus) {
		this.businessStatus = businessStatus;
	}

	public String getStatusMessage() {
		return statusMessage;
	}

	public void setStatusMessage(String statusMessage) {
		this.statusMessage = statusMessage;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public String getOtherMessage() {
		return otherMessage;
	}

	public void setOtherMessage(String otherMessage) {
		this.otherMessage = otherMessage;
	}

	public void builderSystemMsg(String msg) {
		this.businessStatus =-1;
		this.statusMessage = msg;
	}
	
	public void builderBizMsg(String msg) {
		this.businessStatus =0;
		this.statusMessage = msg;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getWsId() {
		return wsId;
	}

	public void setWsId(String wsId) {
		this.wsId = wsId;
	}

	public String getEcho() {
		return echo;
	}

	public void setEcho(String echo) {
		this.echo = echo;
	}

	public String getCityId() {
		return cityId;
	}

	public void setCityId(String cityId) {
		this.cityId = cityId;
	}

	public String getCityName() {
		return cityName;
	}

	public void setCityName(String cityName) {
		this.cityName = cityName;
	}
	
	
}
